import request from '@/utils/request'

const baseUrl = '/prot/articleCategory'

export function getArticleCategoryPage(params) {
  return request({
    url: `${baseUrl}`,
    method: 'get',
    params: params
  })
}

export function getAllArticleCategory() {
  return request({
    url: `${baseUrl}/all`,
    method: 'get'
  })
}

export function getArticleCategoryById(id) {
  return request({
    url: `${baseUrl}/${id}`,
    method: 'get'
  })
}

export function saveArticleCategory(articleCategory) {
  return request({
    url: `${baseUrl}`,
    method: 'post',
    data: articleCategory
  })
}

export function updateArticleCategory(articleCategory) {
  return request({
    url: `${baseUrl}`,
    method: 'put',
    data: articleCategory
  })
}
export function deleteArticleCategoryById(id) {
  return request({
    url: `${baseUrl}/${id}`,
    method: 'delete'
  })
}

export function deleteArticleCategoryBatch(ids) {
  return request({
    url: `${baseUrl}/batch`,
    method: 'delete',
    params: { ids: ids }
  })
}

